<template>
	<view class="container">

		<!--banner-->
		<view class="tui-banner-swiper">
			<swiper :autoplay="true" :interval="5000" :duration="150" :circular="true" :style="{height:scrollH + 'px'}" @change="bannerChange">
				<block v-for="(item,index) in banner" :key="index">
					<swiper-item :data-index="index" @tap.stop="previewImage">
						<image :src="url+'/upload/'+item.url" class="tui-slide-image" :style="{height:scrollH+'px'}" />
					</swiper-item>
				</block>
			</swiper>
			<tui-tag type="translucent" shape="circleLeft" size="small">{{bannerIndex+1}}/{{banner.length}}</tui-tag>
		</view>

		<!--banner-->
		
			
		<view class="tui-pro-detail">
			<view class="tui-product-title tui-border-radius">
				<view class="tui-pro-pricebox tui-padding">
					<view class="tui-pro-price">
						<view>￥<text class="tui-price">{{item.price}}</text></view>
						<tui-tag size="small" :plain="true" type="high-green" shape="circle">自由行</tui-tag>
					</view>
				</view>
				<view class="tui-pro-titbox">
					<view class="tui-pro-title">{{item.name}}</view>
					<button open-type="share" class="tui-share-btn tui-share-position">
						<tui-tag type="gray" tui-tag-class="tui-tag-share tui-size" shape="circleLeft" size="small">
							<view class="tui-icon tui-icon-partake" style="color:#999;font-size:15px"></view>

							<text class="tui-share-text tui-gray">分享</text>
						</tui-tag>
					</button>
				</view>
				<view class="tui-guarantee">
					<view class="tui-guarantee-item">
						<tui-icon name="member" :size='14' color="#f4cccc"></tui-icon>
						<text class="tui-pl">{{item.type}}</text>
					</view>
				</view>
			</view>
			<view class="inv-h-w" style="margin-top: 20rpx;">
				<view :class="['inv-h',Inv==0?'inv-h-se':'']" @click="changeTab(0)">酒店详情</view>
				<view :class="['inv-h',Inv==1?'inv-h-se':'']" @click="changeTab(1)">预定酒店</view>
			</view>
		</view>
		<view style="padding:20rpx">		

				
				<!-- 酒店详情介绍 -->
				<view v-show="Inv == 0">

					<view class="tui-basic-info tui-mtop tui-radius-all">
						
						<view>

							
							<view>
								<tui-icon name="position" :size="25" color="#ffcc00" class="ic"></tui-icon>
								<view class="xinxi2">
									<view class="tui-pl" style="font-weight: 600;font-size: 24rpx;">{{item.address}}</view>
									<view class="tui-pl" style="font-size:24rpx">酒店地址</view>
								</view>
							
							</view>
						</view>
					</view>
					
					
					
					<view class="tui-nomore-box">
						<tui-nomore text="活动详情" :visible="true" bgcolor="#f7f7f7"></tui-nomore>
					</view>
					<view class="tui-product-img tui-radius-all">
						<rich-text :nodes="item.content"></rich-text>
					</view>
					<tui-nomore text="已经到最底了" :visible="true" bgcolor="#f7f7f7"></tui-nomore>
					<view class="tui-safearea-bottom"></view>
					
				</view>
				
				<view v-show="Inv == 1">
					<view class="time">
						<calendar @change="changes" :startDate="initStartDate" :endDate="initEndDate" :daysCount="daysCount"></calendar>
					</view>
					
					<view>
						<view v-for="(item,index) in jiudian" style="background-color: #fff;padding: 20rpx;margin-top: 30rpx;">
							<image :src="item.thumbnail" style="width: 40%;border-radius: 10rpx;margin-right: 5%;" mode="widthFix"></image>
							<view class="jiudian-content">
								<view style="font-size: 36rpx;padding-bottom: 20rpx;">{{item.title}}</view>
								<view style="font-size: 28rpx;padding-bottom: 20rpx;color: #666;">{{item.more}}</view>
								<view style="color: #ff201f;">￥{{item.price}} <text @click="submit(item)" class="yuding">预定</text></view>
							</view>
						</view>
					</view>
					
				</view>


			<!--底部操作栏-->
	<!-- 		<view class="tui-operation">
				<view class="tui-operation-left tui-col-4">
					<view class="tui-operation-item" hover-class="opcity" :hover-stay-time="150">
						<button open-type="contact" class="contact">
							<tui-icon name="kefu" :size="22" color='#333'></tui-icon>
							<view class="tui-operation-text tui-scale-small">客服</view>
						</button>
					</view>
					<view class="tui-operation-item" >
						<button class="contact" open-type="share" >
							<tui-icon name="share" :size="22" color='#333'></tui-icon>
							<view class="tui-operation-text tui-scale-small">分享</view>
						</button>
					</view>
				</view>
				<view class="tui-operation-right tui-right-flex tui-col-8 tui-btnbox-4">
					<view class="tui-flex-1">
						<tui-button type="warning" shape="circle" size="mini" @click="submit()">立即预定</tui-button>
					</view>
				</view>
			</view> -->

		</view>


		
	</view>
</template>

<script>
	var api = require('@/common/api.js')
	import tuiIcon from "@/components/icon/icon"
	import tuiTag from "@/components/tag/tag"
	import tuiBadge from "@/components/badge/badge"
	import tuiNomore from "@/components/nomore/nomore"
	import tuiButton from "@/components/button/button"
	import tuiTopDropdown from "@/components/top-dropdown/top-dropdown"
	import tuiBottomPopup from "@/components/bottom-popup/bottom-popup"
	import tuiNumberbox from "@/components/numberbox/numberbox"
	import calendar from '../../components/date-picker/date-picker';
	export default {
		onShareAppMessage(res) {
			return {
			  title: this.item.title,
			  path: '/pages/hotelDetail/hotelDetail?id='+this.item.id+'?tjr='+uni.getStorageSync("user").id
			}
		},
		onShareTimeline(res) {//分享到朋友圈
		
		    return {
		      title: '伴宠游',
		      path: '/pages/hotelDetail/hotelDetail?id='+this.item.id+'&tjr='+uni.getStorageSync("user").id,
			  query:{
				  tjr:uni.getStorageSync("user").id,
			  }
		    }
		},
		components: {
			tuiIcon,
			tuiTag,
			tuiBadge,
			tuiNomore,
			tuiButton,
			tuiTopDropdown,
			tuiBottomPopup,
			tuiNumberbox,
			calendar
		},
		data() {
			return {
				height: 64, //header高度
				top: 0, //标题图标距离顶部距离
				scrollH: 0, //滚动总高度
				opcity: 0,
				iconOpcity: 0.5,
				banner: [],
				bannerIndex: 0,
				Inv:0,
				value: 1,
				collected: false,
				item:{},
				skuIds:[],
				skuAttrs:[],
				canselect:'',
				isselect:[],
				goodsItem:'',

				url:"",
				userinfo:'',
				showCaledar: false,
				dateStr: '',
				daysCount: 130,
				singleDate: true,
				
				//初始日期
				initStartDate: '2019-12-06',
				initEndDate: '2019-12-07',
				
				jiudian:'',
				checkintime:'',
				departuretime:'',
				totaldays:1,
			}
		},
		onLoad: function(options) {
			if(this.tui.isLogin()){
				this.userinfo = uni.getStorageSync("user")
			}else{
				uni.showToast({
					title:"您没有登陆，请先登录",
					icon:"none"
				})
				setTimeout(function(){
					uni.navigateTo({
						url:"/pages/mall-extend/my/my"
					})
				},1000)
			}
			let obj = {};
			obj = wx.getMenuButtonBoundingClientRect();
			setTimeout(() => {
				uni.getSystemInfo({
					success: (res) => {
						this.width = obj.left || res.windowWidth;
						this.height = obj.top ? (obj.top + obj.height + 8) : (res.statusBarHeight + 44);
						this.top = obj.top ? (obj.top + (obj.height - 32) / 2) : (res.statusBarHeight + 6);
						this.scrollH = res.windowWidth/2
					}
				})
			}, 50)

			//获取数据

			api.get({
				url:"order/classdetail",
				data:{
					id:options.id,
				},
				success: res => {
					console.log(res);
					this.banner = res.data.more.photos;
					
					this.url = res.data.luyou;
					res.data.content = this.formatRichText(res.data.content);
					this.item = res.data;
				}
			})
			api.get({
				url:'order/class',
				data:{
					id:options.id,
				},
				success: res => {
					
					this.jiudian = res.data;
				}
			});
		},
		onBackPress() {
			if (this.showCaledar !== false) {
				this.showCaledar = false;
				return true;
			}
		},
		methods: {
			/**
			 * 处理富文本里的图片宽度自适应
			 * 1.去掉img标签里的style、width、height属性
			 * 2.img标签添加style属性：max-width:100%;height:auto
			 * 3.修改所有style里的width属性为max-width:100%
			 * 4.去掉<br/>标签
			 * @param html
			 * @returns {void|string|*}
			 */
			formatRichText (html) { //控制小程序中图片大小
				let newContent= html.replace(/<img[^>]*>/gi,function(match,capture){
					match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
					match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
					match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
					return match;
				});
				newContent = newContent.replace(/style="[^"]+"/gi,function(match,capture){
					match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
					return match;
				});
				newContent = newContent.replace(/<br[^>]*\/>/gi, '');
				newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"');
				return newContent;
			},
			bannerChange: function(e) {
				this.bannerIndex = e.detail.current
			},
			previewImage: function(e) {
				let index = e.currentTarget.dataset.index;
				uni.previewImage({
					current: this.banner[index],
					urls: this.banner
				})
			},
			changeTab(data){
				this.Inv = data;
				
					 
			},
			back: function() {
				uni.navigateBack()
			},
			change: function(e) {
				this.value = e.value
			},
			changes({
				choiceDate,
				dayCount
			}) {
				//参数解释
				//1.choiceDate 时间区间（开始时间和结束时间）
				//2.dayCount 共多少晚
				this.checkintime = choiceDate[0].re;
				this.departuretime = choiceDate[1].re;
				this.totaldays = dayCount;
				// console.log(choiceDate, dayCount);
				console.log('入住从 ' + choiceDate[0].re + '  到 ' + choiceDate[1].re + '  共 ' + dayCount + ' 晚');
			},
			change2({
				choiceDate,
				dayCount
			}) {
				this.checkintime = choiceDate[0].re;
				this.departuretime = choiceDate[1].re;
				this.totaldays = dayCount;
				this.dateStr =
					'入住从 ' + choiceDate[0].re + ' (星期' + choiceDate[0].week + ')  到 ' + choiceDate[1].re + '(星期' + choiceDate[1].week +
					')' + '  共 ' + dayCount + ' 晚 ';
			},
			change_single({
				choiceDate,
				dayCount
			}) {
				this.checkintime = choiceDate[0].re;
				this.departuretime = choiceDate[1].re;
				this.totaldays = dayCount;
				console.log(choiceDate, dayCount);
			},
			setRandomDate() {
				this.initStartDate = '2019-12-' + parseInt(Math.random() * 29 + 1);
				this.initEndDate = '2019-12-31';
			},
			// collecting: function() {
			// 	this.collected = !this.collected
			// },
			// common: function() {
			// 	this.tui.toast("功能开发中~")
			// },


			
			submit(info){
				console.log(this.checkintime);
				let that = this
				api.post({
					url:'order/jdorder',
					data: {
						user_id:that.userinfo.id,
						name:that.item.name,
						address:that.item.address,
						price:info.price,
						jiudian_id:that.item.id,
						total_price:info.price*that.totaldays,
						room_id:info.id,
						totaldays:that.totaldays,
						checkintime:that.checkintime,
						departuretime:that.departuretime,
					},
					success: res => {
						console.log(res);
						let datainfo = res.data;
						api.post({
							url:"order/orderPay",
							data:datainfo,
							success:res2=>{
								console.log('返回数据',res2);
								let info = res2.data;
								//调用微信支付api
								 uni.requestPayment({
									 provider: 'wxpay',
									 timeStamp: info.timeStamp,
									 nonceStr: info.nonceStr,
									 package: info.package,
									 signType: info.signType,
									 paySign: info.paySign, //签名，这个要提前获取一下
									 success: function (res) {
										//跳转到支付成功的订单页面
										console.log('支付返回的数据',res);
										uni.reLaunch({
											url:'/pages/mall-extend/myOrder/myOrder'
										})
									 },
									 fail: function (err) {
										 console.log(err);
										 uni.showToast({
											 title:'支付失败',
											 icon:'none'
										 })
										uni.reLaunch({
											url:'/pages/mall-extend/myOrder/myOrder'
										})
									 }
								 }) 
							}
						})
				
						
					},
					fail:function(res){
						console.log(res);
					},
				})
			},
		},
		onPageScroll(e) {
			let scroll = e.scrollTop <= 0 ? 0 : e.scrollTop;
			let opcity = scroll / this.scrollH;
			if (this.opcity >= 1 && opcity >= 1) {
				return;
			}
			this.opcity = opcity;
			this.iconOpcity = 0.5 * (1 - opcity < 0 ? 0 : 1 - opcity)
		},
	}
</script>

<style>
	/* icon 也可以使用组件*/
	@import "../../static/style/icon.css";
	.yuding{    float: right;
    border: 2rpx solid #ff201f;
    padding: 2rpx 10rpx;
    border-radius: 50rpx;}
	.jiudian-content{    display: inline-block;
    width: 55%;
    vertical-align: top;}
	.inv-h-w{background-color: #FFFFFF;height: 100upx;display: flex;}
	.inv-h{font-size: 30upx;flex: 1;text-align: center;color: #C9C9C9;height: 100upx;line-height: 100upx;}
	.inv-h-se{color: #FF9014;border-bottom: 4upx solid #FF9014;}
	.nav_te{display: inline-block;}
	.time{background-color: #fff;margin-top: 40rpx;}
	.xinxi{border-bottom: 1px solid #f0f0f0;padding-bottom: 5px;padding-top: 20rpx;margin-left: 100rpx;}
	.xinxi2{padding-bottom: 5px;padding-top: 20rpx;margin-left: 100rpx;}
	.ic{float: left;padding-top: 28rpx;padding-left: 30rpx;}
	.contact {
		background: transparent;
		height: 100rpx;
		line-height: 1.5;
		padding-top: 10rpx;
		font-size: 20rpx;
	}
	.noselect {color:#999;}
	page {
		background: #f7f7f7;
	}

	.container {
		padding-bottom: 110rpx;
		padding: 0 !important;
	}

	.tui-header-box {
		width: 100%;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 9998;
	}

	.tui-header {
		width: 100%;
		font-size: 18px;
		line-height: 18px;
		font-weight: 500;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tui-header-icon {
		position: fixed;
		top: 0;
		left: 10px;
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		height: 32px;
		transform: translateZ(0);
		z-index: 99999;
	}



	.tui-header-icon .tui-badge {
		background: #e41f19 !important;
		position: absolute;
		right: -4px;
	}

	.tui-icon-ml {
		margin-left: 20rpx;
	}

	.tui-icon {
		border-radius: 16px;
	}


	.tui-icon-back {
		height: 32px !important;
		width: 32px !important;
		display: block !important;
	}

	.tui-header-icon .tui-icon-more-fill {
		height: 20px !important;
		width: 20px !important;
		padding: 6px !important;
		display: block !important;
	}

	.tui-banner-swiper {
		position: relative;
	}

	.tui-banner-swiper .tui-tag-class {
		position: absolute;
		color: #fff;
		bottom: 30rpx;
		right: 0;
	}

	.tui-slide-image {
		width: 100%;
		display: block;
	}

	/*顶部菜单*/

	.tui-menu-box {
		box-sizing: border-box;
	}

	.tui-menu-header {
		font-size: 34rpx;
		color: #fff;
		height: 32px;
		display: flex;
		align-items: center;
	}

	.tui-top-dropdown {
		z-index: 9999 !important;
	}

	.tui-menu-itembox {
		color: #fff;
		padding: 40rpx 10rpx 0 10rpx;
		box-sizing: border-box;
		display: flex;
		flex-wrap: wrap;
		font-size: 26rpx;
	}

	.tui-menu-item {
		width: 22%;
		height: 160rpx;
		border-radius: 24rpx;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: center;
		background: rgba(0, 0, 0, 0.4);
		margin-right: 4%;
		margin-bottom: 4%;
	}

	.tui-menu-item:nth-of-type(4n) {
		margin-right: 0;
	}

	.tui-badge-box {
		position: relative;
	}

	.tui-badge-box .tui-badge-class {
		position: absolute;
		top: -8px;
		right: -8px;
	}

	.tui-msg-badge {
		top: -10px;
	}

	.tui-icon-up {
		position: relative;
		display: inline-block;
		left: 50%;
		transform: translateX(-50%);
	}

	.tui-menu-text {
		padding-top: 12rpx;
	}

	.tui-opcity .tui-menu-text,
	.tui-opcity .tui-badge-box {
		opacity: 0.5;
		transition: opacity 0.2s ease-in-out;
	}

	/*顶部菜单*/

	/*内容 部分*/

	.tui-padding {
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	/* #ifdef H5 */
	.tui-ptop {
		padding-top: 44px;
	}

	/* #endif */

	.tui-size {
		font-size: 24rpx;
		line-height: 24rpx;
	}

	.tui-gray {
		color: #999;
	}

	.tui-icon-red {
		color: #ff201f;
	}

	.tui-border-radius {
		border-bottom-left-radius: 24rpx;
		border-bottom-right-radius: 24rpx;
		overflow: hidden;
	}

	.tui-radius-all {
		border-radius: 24rpx;
		overflow: hidden;
	}

	.tui-mtop {
		margin-top: 26rpx;
	}

	.tui-pro-detail {
		box-sizing: border-box;
		color: #333;
	}

	.tui-product-title {
		background: #fff;
		padding: 30rpx 0;
	}

	.tui-pro-pricebox {
		display: flex;
		align-items: center;
		justify-content: space-between;
		color: #ff201f;
		font-size: 36rpx;
		font-weight: bold;
		line-height: 44rpx;
	}

	.tui-pro-price {
		display: flex;
		align-items: center;
	}

	.tui-pro-price .tui-tag-class {
		transform: scale(0.7);
		transform-origin: center center;
		line-height: 24rpx;
		font-weight: normal;
	}

	.tui-price {
		font-size: 58rpx;
	}

	.tui-original-price {
		font-size: 26rpx;
		line-height: 26rpx;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
	}

	.tui-line-through {
		text-decoration: line-through;
	}

	.tui-collection {
		color: #333;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: center;
		height: 44rpx;
	}

	.tui-scale {
		transform: scale(0.7);
		transform-origin: center center;
		line-height: 24rpx;
		font-weight: normal;
	}

	.tui-icon-collection {
		line-height: 20px !important;
		margin-bottom: 0 !important;

	}

	.tui-pro-titbox {
		font-size: 32rpx;
		font-weight: 500;
		position: relative;
		padding: 0 150rpx 0 30rpx;
		box-sizing: border-box;
	}

	.tui-pro-title {
		padding-top: 20rpx;
		font-weight: 600;
	}

	.tui-share-btn {
		display: block;
		background: none;
		margin: 0;
		padding: 0;
		border-radius: 0;
	}

	.tui-tag-share {
		display: flex;
		align-items: center;
	}

	.tui-share-position {
		position: absolute;
		right: 0;
		top: 30rpx;
	}

	.tui-share-text {
		padding-left: 8rpx;
	}

	.tui-sub-title {
		padding: 20rpx 0;
	}

	.tui-sale-info {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-top: 30rpx;
	}

	.tui-discount-box {
		background: #fff;
	}

	.tui-list-cell {
		position: relative;
		display: flex;
		align-items: center;
		font-size: 26rpx;
		line-height: 26rpx;
		padding: 36rpx 30rpx;
		box-sizing: border-box;
	}

	.tui-right {
		position: absolute;
		right: 30rpx;
		top: 30rpx;
	}

	.tui-top40 {
		top: 40rpx !important;
	}

	.tui-bold {
		font-weight: bold;
	}

	.tui-list-cell::after {
		content: '';
		position: absolute;
		border-bottom: 1rpx solid #eaeef1;
		-webkit-transform: scaleY(0.5);
		transform: scaleY(0.5);
		bottom: 0;
		right: 0;
		left: 126rpx;
	}

	.tui-last::after {
		border-bottom: 0 !important;
	}

	.tui-tag-coupon-box {
		display: flex;
		align-items: center;
	}

	.tui-tag-coupon-box .tui-tag-class {
		margin-right: 20rpx;
	}


	.tui-cell-title {
		width: 66rpx;
		padding-right: 30rpx;
		flex-shrink: 0;
	}

	.tui-promotion-box {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		padding: 10rpx 0;
		width: 74%;
	}

	.tui-promotion-box .tui-tag-class {
		display: inline-block !important;
		transform: scale(0.8);
		transform-origin: 0 center;
	}

	/* .tui-inline-block {
		display: inline-block !important;
		transform: scale(0.8);
		transform-origin: 0 center;
	} */

	.tui-basic-info {
		background: #fff;
	}

	.tui-addr-box {
		width: 76%;
	}

	.tui-addr-item {
		padding: 10rpx;
		line-height: 34rpx;
	}

	.tui-guarantee {
		background: #fdfdfd;
		display: flex;
		flex-wrap: wrap;
		padding: 10rpx 30rpx 0rpx 30rpx;
		font-size: 24rpx;
	}

	.tui-guarantee-item {
		color: #999;
		padding-right: 30rpx;
		padding-top: 10rpx;
	}

	.tui-pl {
		padding-left: 4rpx;
	}

	.tui-cmt-box {
		background: #fff;
	}

	.tui-between {
		justify-content: space-between !important;
	}

	.tui-cmt-all {
		color: #ff201f;
		padding-right: 8rpx;
	}

	.tui-cmt-content {
		font-size: 26rpx;
	}

	.tui-cmt-user {
		display: flex;
		align-items: center;
	}

	.tui-acatar {
		width: 60rpx;
		height: 60rpx;
		border-radius: 30rpx;
		display: block;
		margin-right: 16rpx;
	}

	.tui-cmt {
		padding: 14rpx 0;
	}

	.tui-attr {
		font-size: 24rpx;
		color: #999;
		padding: 6rpx 0;
	}

	.tui-cmt-btn {
		padding: 50rpx 0 30rpx 0;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tui-tag-cmt {
		min-width: 130rpx;
		padding: 20rpx 52rpx !important;
		font-size: 26rpx !important;
		display: inline-block;
	}

	.tui-nomore-box {
		padding-top: 10rpx;
	}

	.tui-product-img {
		transform: translateZ(0);
	}

	.tui-product-img image {
		width: 100%;
		display: block;
	}

	/*底部操作栏*/

	.tui-col-8 {
		width: 66.66666666%;
	}

	.tui-col-4 {
		width: 33.33333333%;
	}

	.tui-operation {
		width: 100%;
		height: 100rpx;
		/* box-sizing: border-box; */
		background: rgba(255, 255, 255, 0.98);
		position: fixed;
		display: flex;
		align-items: center;
		justify-content: space-between;
		z-index: 10;
		bottom: 0;
		left: 0;
	}

	.tui-safearea-bottom {
		width: 100%;
		height: env(safe-area-inset-bottom);
	}

	.tui-operation::before {
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		border-top: 1rpx solid #eaeef1;
		-webkit-transform: scaleY(0.5);
		transform: scaleY(0.5);
	}

	.tui-operation-left {
		display: flex;
		align-items: center;
	}

	.tui-operation-item {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		position: relative;
	}

	.tui-operation-text {
		font-size: 22rpx;
		color: #333;
	}

	.tui-opacity {
		opacity: 0.5;
	}

	.tui-scale-small {
		transform: scale(0.9);
		transform-origin: center center;
	}

	.tui-operation-right {
		height: 100rpx;
		/* box-sizing: border-box; */
		padding-top: 0;
	}

	.tui-right-flex {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tui-btnbox-4 .tui-btn-class {
		width: 90% !important;
		display: block !important;
		font-size: 28rpx !important;
	}

	.tui-operation .tui-badge-class {
		position: absolute;
		top: -6rpx;
		/* #ifdef H5 */
		transform: translateX(50%)
			/* #endif  */
	}

	.tui-flex-1 {
		flex: 1;
	}

	/*底部操作栏*/

	/*底部选择弹层*/

	.tui-popup-class {
		border-top-left-radius: 24rpx;
		border-top-right-radius: 24rpx;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.tui-popup-box {
		position: relative;
		padding: 30rpx 0 100rpx 0;
	}

	.tui-popup-btn {
		width: 100%;
		position: absolute;
		left: 0;
		bottom: 0;
	}

	.tui-popup-btn .tui-btn-class {
		width: 90% !important;
		display: block !important;
		font-size: 28rpx !important;
	}

	.tui-icon-close {
		position: absolute;
		top: 30rpx;
		right: 30rpx;
	}

	.tui-product-box {
		display: flex;
		align-items: flex-end;
		font-size: 24rpx;
		padding-bottom: 30rpx;
	}

	.tui-popup-img {
		height: 200rpx;
		width: 200rpx;
		border-radius: 24rpx;
		display: block;
	}

	.tui-popup-price {
		padding-left: 20rpx;
		padding-bottom: 8rpx;
	}

	.tui-amount {
		color: #ff201f;
		font-size: 36rpx;
	}

	.tui-number {
		font-size: 24rpx;
		line-height: 24rpx;
		padding-top: 12rpx;
		color: #999;
	}

	.tui-popup-scroll {
		height: 600rpx;
		font-size: 26rpx;
	}

	.tui-scrollview-box {
		padding: 0 30rpx 60rpx 30rpx;
		box-sizing: border-box;
	}

	.tui-attr-title {
		padding: 10rpx 0;
		color: #333;
	}

	.tui-attr-box {
		font-size: 0;
		padding: 20rpx 0;
	}

	.tui-attr-item {
		max-width: 100%;
		min-width: 200rpx;
		height: 64rpx;
		display: -webkit-inline-flex;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: #f7f7f7;
		padding: 0 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		margin-right: 20rpx;
		margin-bottom: 20rpx;
		font-size: 26rpx;
	}

	.tui-attr-active {
		background: #fcedea !important;
		color: #e41f19;
		font-weight: bold;
		position: relative;
	}

	.tui-attr-active::after {
		content: "";
		position: absolute;
		border: 1rpx solid #e41f19;
		width: 100%;
		height: 100%;
		border-radius: 40rpx;
		left: 0;
		top: 0;
	}

	.tui-number-box {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx 0 30rpx 0;
		box-sizing: border-box;
	}

	/*底部选择弹层*/
</style>
